#include <stdio.h>
#include <string.h>
#define BUFFER_SIZE 10

/*打印数组的值*/

/*数组做函数的参数会自动弱化为字节*/
int printfArray(int *array, int arraySize)
{
    /*   */
    int Len = sizeof(array);//8
    int len = sizeof(array[0]);//4
    int elementSize = Len / len;//2

    printf("printf-elementSize = %d",elementSize );
    return 0;

}


int main()

{
    int array[BUFFER_SIZE];
    /*清楚脏数据*/
    memset(array, 0, sizeof(array)); 
     int Len = sizeof(array);//8
    int len = sizeof(array[0]);//4
    int elementSize = Len / len;//2

    printf("main-elementSize = %d",elementSize );

    for(int idx = 0; idx < BUFFER_SIZE; idx++)
    {

        array[idx] = (idx + 1) * 10;

    }
    printfArray(array, elementSize);
    for(int idx = 0; idx < BUFFER_SIZE; idx++)
    {

        printf("array[%d] = %d\n", idx, array[idx]);

    }


}